#pragma once

#include "data.h"
#include "message.grpc.pb.h"
#include "message.pb.h"

#include <grpcpp/grpcpp.h>
#include <mutex>


class ChatGrpcServiceImpl final : public message::ChatService::Service
{
public:
    grpc::Status NotifyAddFriend(grpc::ServerContext* context, const message::AddFriendReq* request, 
        message::AddFriendRsp* response) override;

    grpc::Status NotifyAuthFriend(grpc::ServerContext* context, const message::AuthFriendReq* request, 
        message::AuthFriendRsp* response) override;

    grpc::Status NotifyTextChatMsg(grpc::ServerContext* context, const message::TextChatMsgReq* request, 
        message::TextChatMsgRsp* response) override;

    bool getBaseInfo(std::string base_key, int uid, std::shared_ptr<UserInfo>& userinfo);

}; 
